package com.ncst.backend.service.impl;

import com.ncst.backend.domain.PharmacyRecord;
import com.ncst.backend.domain.FeeItem;
import com.ncst.backend.mapper.PharmacyRecordMapper;
import com.ncst.backend.service.PharmacyRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;

@Service
@RequiredArgsConstructor
public class PharmacyRecordServiceImpl implements PharmacyRecordService {

    private final PharmacyRecordMapper pharmacyRecordMapper;

    @Override
    public List<PharmacyRecord> search(String key, LocalDateTime start, LocalDateTime end, String state) {
        return pharmacyRecordMapper.search(key, start, end, state);
    }

    @Override
    public List<FeeItem> getFeeDetail(Integer registerId) {
        return pharmacyRecordMapper.selectFeeItems(registerId);
    }
}